package graph.basic;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class GraphImplementation {

    public static void main(String args[]) {
//creating an object of the Graph class
        Graph graph = new Graph();
//adding edges to the graph
        graph.addNewEdge(0, 1, true);
        graph.addNewEdge(0, 4, true);
        graph.addNewEdge(1, 2, true);
        graph.addNewEdge(1, 3, false);
        graph.addNewEdge(1, 4, true);
        graph.addNewEdge(2, 3, true);
        graph.addNewEdge(2, 4, true);
        graph.addNewEdge(3, 0, true);
        graph.addNewEdge(2, 0, true);
//prints the adjacency matrix that represents the graph
        System.out.println("Adjacency List for the graph:\n" + graph.toString());
//counts the number of vertices in the graph
        int i = graph.countVertices();
        log.info("vertices:{}", i);
//counts the number of edges in the graph
        int edges = graph.countEdges();
        log.info("edges:{}", i);
//checks whether an edge is present or not between the two specified vertices
        boolean containsEdge = graph.containsEdge(3, 4);
        log.info("graph.containsEdge(3, 4) result: {}", containsEdge);
        containsEdge = graph.containsEdge(2, 4);
        log.info("graph.containsEdge(2, 4) result: {}", containsEdge);
//checks whether vertex is present or not
        containsEdge = graph.containsVertex(3);
        log.info("graph.containsVertex(3) result: {}", containsEdge);
        containsEdge = graph.containsVertex(5);
        log.info("graph.containsVertex(5) result: {}", containsEdge);
        String a  = "";
        switch (a) {
            case "1":
                System.out.println("1");
                break;
            case "2":
                System.out.println("2");
        }
        System.out.println("xxx");
    }

}
